package icu.lookyousmileface.proxy;

/**
 * @author starrysky
 * @title: ProxyMain
 * @projectName spring5
 * @description: TODO
 * @date 2021/2/223:32
 */
public class ProxyMain {
    public static void main(String[] args) {
        ProxyHandler proxyHandler = new ProxyHandler();
        //proxyHandler -> HostMaster接口类 -> Host接口
        proxyHandler.setProxy(new HostMaster());
        //获取newProxyInstance动态生成代理类
        Host proxy = (Host) proxyHandler.getProxy();
        proxy.rent();
    }
}
